<script lang="ts" setup>
import { computed } from 'vue'

interface Props {
  bg?: string
  center?: string
  display?: string
  width?: string
  height?: string
}
const props = withDefaults(defineProps<Props>(), {
  bg: 'rgba(69, 170, 255, 0.5)',
  center: 'center',
  display: 'flex',
  width: 'auto',
  height: 'auto',
})
const bg = computed(() => props.bg)
const center = computed(() => props.center)
const display = computed(() => props.display)
const width = computed(() => props.width)
const height = computed(() => props.height)
</script>

<template>
  <div class="border-box2-container">
    <div id="toral">
      <slot />
    </div>
  </div>
</template>

<style scoped>
.border-box2-container {
  font-size: 32px;
  line-height: 2;
  margin: 10px;
  background: v-bind(bg);
  color: #fff;
  cursor: pointer;
  display: v-bind(display);
  align-items: center;
  justify-content: center;
  position: relative;
  width: v-bind(width);
  height: v-bind(height);
}
.border-box2-container::before {
  width: 10px;
  height: 10px;
  border-left: 2px solid #45aaff;
  border-top: 2px solid #45aaff;
  content: '';
  position: absolute;
  left: 0;
  top: 0;
}

.border-box2-container::after {
  width: 10px;
  height: 10px;
  border-right: 2px solid #45aaff;
  border-top: 2px solid #45aaff;
  content: '';
  position: absolute;
  right: 0;
  top: 0;
}
#toral {
  width: 100%;
  text-align: v-bind(center);
}

#toral::before {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-left: 2px solid #45aaff;
  border-bottom: 2px solid #45aaff;
  content: '';
}
#toral::after {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid #45aaff;
  border-bottom: 2px solid #45aaff;
  content: '';
}
</style>
